package vo;

// Generated Aug 28, 2012 12:34:05 AM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * OrderDetails generated by hbm2java
 */
@Entity
@Table(name = "order_details", schema = "order_schema")
public class OrderDetails implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1357921147891015980L;
	private int orderSeqId;
	private TableDetails tableDetails;
	private String orderStatus;
	private int totalBill;
	private Date startTime;
	private Date endTime;
	private Set<OrderIndividualDetails> orderIndividualDetailses = new HashSet<OrderIndividualDetails>(
			0);

	public OrderDetails() {
	}

	public OrderDetails(int orderSeqId, TableDetails tableDetails,
			String orderStatus, int totalBill, Date startTime, Date endTime) {
		this.orderSeqId = orderSeqId;
		this.tableDetails = tableDetails;
		this.orderStatus = orderStatus;
		this.totalBill = totalBill;
		this.startTime = startTime;
		this.endTime = endTime;
	}

	public OrderDetails(int orderSeqId, TableDetails tableDetails,
			String orderStatus, int totalBill, Date startTime, Date endTime,
			Set<OrderIndividualDetails> orderIndividualDetailses) {
		this.orderSeqId = orderSeqId;
		this.tableDetails = tableDetails;
		this.orderStatus = orderStatus;
		this.totalBill = totalBill;
		this.startTime = startTime;
		this.endTime = endTime;
		this.orderIndividualDetailses = orderIndividualDetailses;
	}

	@Id
	@Column(name = "order_seq_id", unique = true, nullable = false)
	public int getOrderSeqId() {
		return this.orderSeqId;
	}

	public void setOrderSeqId(int orderSeqId) {
		this.orderSeqId = orderSeqId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "link_table", nullable = false)
	public TableDetails getTableDetails() {
		return this.tableDetails;
	}

	public void setTableDetails(TableDetails tableDetails) {
		this.tableDetails = tableDetails;
	}

	@Column(name = "order_status", nullable = false, length = 20)
	public String getOrderStatus() {
		return this.orderStatus;
	}

	public void setOrderStatus(String orderStatus) {
		this.orderStatus = orderStatus;
	}

	@Column(name = "total_bill", nullable = false)
	public int getTotalBill() {
		return this.totalBill;
	}

	public void setTotalBill(int totalBill) {
		this.totalBill = totalBill;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "start_time", nullable = false, length = 29)
	public Date getStartTime() {
		return this.startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "end_time", nullable = false, length = 29)
	public Date getEndTime() {
		return this.endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "orderDetails")
	public Set<OrderIndividualDetails> getOrderIndividualDetailses() {
		return this.orderIndividualDetailses;
	}

	public void setOrderIndividualDetailses(
			Set<OrderIndividualDetails> orderIndividualDetailses) {
		this.orderIndividualDetailses = orderIndividualDetailses;
	}

}
